:root {
    --tasks-details-icon: url("data:image/svg+xml;charset=utf-8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M8.59 16.58L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.42z'/></svg>");

}

/* Fix indentation of wrapped task lines in Tasks search results, when in Live Preview. */
ul.contains-task-list .task-list-item-checkbox {
    margin-inline-start: calc(var(--checkbox-size) * -1.5) !important;
}

.plugin-tasks-query-explanation{
    /* Prevent long explanation lines wrapping, so they are more readable,
       especially on small screens.

       A horizontal scroll bar will be displayed, if the explanation
       is too wide to fit.
     */
    --code-white-space: pre;
}

.tasks-count {
    color: var(--text-faint);
    padding-left: 20px;
}

/* Tooltip pop up above the description in short mode */
.tooltip.pop-up {
    animation: pop-up-animation 200ms forwards ease-in-out;
}
@keyframes pop-up-animation {
  0% {
    opacity: 0;
    transform: translateY(-100%) scale(1);
  }
  20% {
    opacity: 0.7;
    transform: translateY(-100%) scale(1.02);
  }
  40% {
    opacity: 1;
    transform: translateY(-100%) scale(1.05);
  }
  100% {
    opacity: 1;
    transform: translateY(-100%) scale(1);
  }
}

/* Edit and postpone */
.tasks-edit, .tasks-postpone {
    width: 1em;
    height: 1em;
    vertical-align: middle;
    margin-left: .33em;
    cursor: pointer;
    font-family: var(--font-interface);
    color: var(--text-accent);
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

a.tasks-edit, a.tasks-postpone {
    text-decoration: none;
}

.tasks-edit::after {
    content: '📝';
}

.tasks-postpone::after {
    content: '⏩';
}

/* Urgency score */
.tasks-urgency {
    font-size: var(--font-ui-smaller);
    font-family: var(--font-interface);
    padding: 2px 6px;
    border-radius: var(--radius-s);
    color: var(--text-normal);
    background-color: var(--background-secondary);
    margin-left: 0.5em;
    line-height: 1;
}

.internal-link.internal-link-short-mode {
    text-decoration: none;
}

.tasks-list-text {
    position: relative;
}

.tasks-list-text .tooltip {
    position: absolute;
    top: 0px;
    left: 0px;
    white-space: nowrap;
}

.task-list-item-checkbox {
    cursor: pointer;
}

/* Hide tags that Obsidian recognises, if `hide tags` instruction was used. */
.tasks-layout-hide-tags .task-description a.tag {
    display: none;
}

/* Workaround for issue #2073: Enabling the plugin causes blockIds to be not hidden in reading view
   https://github.com/obsidian-tasks-group/obsidian-tasks/issues/2073 */
.task-list-item .task-block-link{
    display: none;
}

.tasks-setting-important {
    color: red;
    font-weight: bold;
}

/**------------------------------------------------------------------------
 **                            MODAL
 *------------------------------------------------------------------------**/

.tasks-modal-section + .tasks-modal-section {
    margin-top: 8px;
}

.tasks-modal-section label {
    display: inline-block;
    margin-bottom: 4px;
}

.tasks-modal-section label > span {
    display: inline-block;
}

.tasks-modal .with-accesskeys .accesskey-first::first-letter,
.tasks-modal .with-accesskeys .accesskey {
    text-decoration: underline;
    text-underline-offset: 1pt;
}

.tasks-modal-buttons {
    position: sticky;
    bottom: 0;
    background-color: var(--modal-background);
    padding-bottom: 16px;
    padding-top: 16px;
    display: grid;
    grid-template-columns: 3fr 1fr;
    column-gap: .5em;
}

.tasks-modal label + input[type="checkbox"] {
    margin-left: 0.67em;
    top: 2px;
}

.tasks-modal input[type="text"] {
    width: 100%;
}

.tasks-modal textarea {
    width: 100%;
    min-height: calc(var(--input-height) * 2);
    resize: vertical;
}

.tasks-modal-priorities {
    display: grid;
    grid-template-columns: 4em 8em 8em 8em;
    grid-column-gap: 1.33em;
}

.tasks-modal-priorities span {
    line-height: 1.41;
    white-space: nowrap;
}

.tasks-modal-priorities label {
    border-radius: var(--input-radius);
    padding: 2px 3px;
    grid-column: 1;
    grid-row-start: 1;
    grid-row-end: 7;
}

.tasks-modal-priorities input:focus + label {
    box-shadow: 0 0 0 2px var(--background-modifier-border-focus);
    border-color: var(--background-modifier-border-focus);
}

.tasks-modal-priorities input:checked + label > span {
    font-weight: bold;
}

.tasks-modal-priorities input:not(:checked) + label > span:nth-child(4) {
    filter: grayscale(100%) opacity(60%);
}

.tasks-modal-dates {
    display: grid;
    grid-template-columns: 5.5em auto;
    column-gap: .5em;
    row-gap: 5px;
}

.tasks-modal-dates > label {
    grid-column: 1;
    margin-top: 6px;
}

.tasks-modal-dates > .input, .tasks-modal-dates > .results {
    grid-column: 2;
    align-items: stretch;
}

.tasks-modal-dates > .results {
    margin-bottom: 5px;
}

.tasks-modal-dates > div {
    grid-column-start: 1;
    grid-column-end: 3;
}

.tasks-modal-status {
    padding-bottom: 6px;
    margin-bottom: -16px;
    display: flex;
    justify-content: space-between;
}

.tasks-modal-error {
    border: 1px solid red !important;
}

.tasks-modal-warning {
    color: var(--text-warning) !important;
    background-color: rgba(var(--background-modifier-warning-rgb), 0.2) !important;
}

.tasks-modal button:disabled {
    pointer-events: none !important;
    opacity: 0.3 !important;
}

@media (max-width: 649px) {
    .tasks-modal-priorities {
        grid-template-columns: 4em 7.5em 5em;
        margin-bottom: -10px;
    }
    .tasks-modal-priorities > label {
        grid-row: 1 / span 7;
    }
    .tasks-modal-dates {
        grid-template-columns: 1fr;
    }
    .tasks-modal-dates > label {
        margin: 0;
    }
    .tasks-modal-dates > .input, .tasks-modal-dates > .results {
        grid-column: 1;
    }
    .tasks-modal-dates > div {
        grid-column-end: 1;
    }
    .tasks-modal-status {
        display: block;
    }
}

@media (max-width: 399px) {
    .tasks-modal-priorities {
        grid-template-columns: 4em auto;
    }
    .tasks-modal-priorities > label {
        grid-row: 1 / span 7;
    }
}

@media (max-width: 259px) {
    .tasks-modal-priorities {
        grid-template-columns: 1fr;
        margin-bottom: 0;
    }
    .tasks-modal-priorities > label {
        grid-row: 1;
    }
}
/* Dependency Styles */

.task-dependencies-container {
    padding-bottom: 4px;
    padding-top: 4px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.task-dependency {
    display: inline-flex;
    background-color: var(--interactive-normal);
    box-shadow: var(--input-shadow);
    border-radius: 28px;
    padding: 6px 8px 6px 12px;
}

.task-dependency-name {
    font-size: 14px;
    max-width: 160px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.task-dependency-delete {
    padding: 3px;
    border-radius: 50%;
    margin-left: 6px;
    cursor: pointer;
    height: inherit;
    box-shadow: none !important;
    background-color: var(--background-primary) !important;
}

.task-dependency-dropdown {
    list-style: none;
    position: absolute;
    top: 0;
    left: 0;
    padding: 4px;
    margin: 0;
    background-color: var(--background-primary);
    border: 1px;
    border-radius: 6px;
    border-color: var(--background-modifier-border);
    border-style: solid;
    z-index: 99;
    max-height: 170px;
    overflow-y: auto;
}

.task-dependency-dropdown li {
    padding: 5px;
    margin: 2px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    justify-content: space-between
}
.task-dependency-dropdown li .dependency-name {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.task-dependency-dropdown li .dependency-name-shared {
    width: calc(60%);
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.task-dependency-dropdown li .dependency-path {
    width: calc(40%);
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-style: italic;
    text-align: right;
    color: var(--italic-color)
}

.task-dependency-dropdown li.selected {
    background-color: var(--text-selection);
}

/**------------------------------------------------------------------------
 **                            SETTINGS
 *------------------------------------------------------------------------**/

.tasks-settings-is-invalid {
    /* Dark red text on pale background*/
    color: var(--text-error) !important;
    background-color: rgba(var(--background-modifier-error-rgb), 0.2) !important;
}


 .tasks-settings .additional {
    margin: 6px 12px;
}
.tasks-settings .additional > .setting-item {
    border-top: 0;
    padding-top: 9px;
}


.tasks-settings details > summary {
    outline: none;
    display: block !important;
    list-style: none !important;
    list-style-type: none !important;
    min-height: 1rem;
    border-top-left-radius: 0.1rem;
    border-top-right-radius: 0.1rem;
    cursor: pointer;
    position: relative;
}

.tasks-settings details > summary::-webkit-details-marker,
.tasks-settings details > summary::marker {
    display: none !important;
}

.tasks-settings details > summary > .collapser {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    content: "";
}

.tasks-settings details > summary > .collapser > .handle {
    transform: rotate(0deg);
    transition: transform 0.25s;
    background-color: currentColor;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-image: var(--tasks-details-icon);
    mask-image: var(--tasks-details-icon);
    width: 20px;
    height: 20px;
}

.tasks-settings details[open] > summary > .collapser > .handle {
    transform: rotate(90deg);
}

.tasks-nested-settings .setting-item {
    border: 0px;
    padding-bottom: 0;
}
.tasks-nested-settings {
    padding-bottom: 18px;
}
.tasks-nested-settings[open] .setting-item-heading,
.tasks-nested-settings:not(details) .setting-item-heading {
    border-top: 0px;
    border-bottom: 1px solid var(--background-modifier-border);
}

.tasks-settings .row-for-status {
    margin-top: 0px;
    margin-bottom: 0px;
}
